home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Dialog2 / c / OpenStatic < prev   
Text File  |  1995-05-19  |  2KB  |  50 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Dialog2.OpenStatic.c
  12.     Author:  Copyright © 1994 Julian Smith
  13.     Version: 1.03 (13 Mar 1995)
  14.     Purpose: Dialogue box handling
  15. */
  16.  
  17.  
  18. #include "Defs.h"
  19.  
  20.  
  21.  
  22. BOOL    Dialog2_OpenDialogStatic( dialog2_block *dialog2, window_openpos openpos)
  23. {
  24. if ( !dialog2)    return ERROR;
  25.  
  26. if ( dialog2->flags.data.type == dialog2_type_MENULEAF)
  27.     Dialog2__CloseDialogInternal( dialog2, FALSE, FALSE/*dontdeletewindow*/);
  28.     
  29. else if ( dialog2->flags.data.type == dialog2_type_STATIC)
  30.     Dialog2__CloseDialogInternal( dialog2, FALSE/*dontclosemenu*/, FALSE/*dontdeletewindow*/);
  31.     /* This dialog2 is already open as a static dialog, so close it,    */
  32.     /* but keep its window handle and don't close any existing menu.    */
  33.  
  34. else if ( dialog2->flags.data.type == dialog2_type_MENU)
  35.     Dialog2__CloseDialogInternal( dialog2, TRUE/*close exisiting menu*/, FALSE);
  36.     /* This dialog2 is already open as a menu-window, so close it,     */
  37.     /* deleting the menu. This won't be that good in RO2 - it will     */
  38.     /* close the existing menu sometimes.                */
  39.  
  40.  
  41.  
  42. dialog2->flags.data.type    = dialog2_type_STATIC;
  43. Dialog2__CommonOpenCode( dialog2);
  44.  
  45. Window_Show( dialog2->window, openpos);
  46.  
  47. return NOERROR;
  48. }
  49.  
  50.